<include file="public@header" />
</head>
<body>
	<div class="wrap js-check-wrap">
		<ul class="nav nav-tabs">
			<li class="active"><a href="{:url('supplier/index')}">供应商列表</a></li>
			<li><a href="{:url('supplier/add')}">添加供应商</a></li>
		</ul>
		<form class="well form-inline margin-top-20" method="get" action="{:url('supplier/index')}">
            供应商名称:
            <input type="text" class="form-control" name="name" style="width: 180px;" value="{$name}" placeholder="请输入供应商名称">
            <input type="submit" class="btn btn-primary" value="搜索" />
        </form>

		<table class="table table-hover table-bordered">
			<thead>
				<tr>
					<th>供应商ID</th>
					<th>供应商名称</th>
					<th>联系人姓名</th>
					<th>手机号</th>
					<th>微信/QQ</th>
					<th>添加时间</th>
					<th>状态</th>
					<th>操作</th>
				</tr>
			</thead>
			<tbody>
		
				<foreach name="list" item="vo">
				<tr>
					<td>{$vo.id}</td>
					<td>{$vo.name}</td>
					<td>{$vo.linkman}</td>
					<td>{$vo.mobile}</td>
					<td>{$vo.qq}</td>
					<td>{$vo.add_time}</td>
					<td>
						<if condition="$vo.status eq 1">
							<span class="label label-success">上架中</span>
						<else/>
							<span class="label label-danger">已下架</span>
						</if>
					</td>
					<td>
						<a href="{:url('supplier/add', ['id' => $vo.id])}">编辑</a>

						<if condition="$vo.status eq 1">
							<a href="{:url('supplier/del', ['id' => $vo.id])}">下架</a>
						<else/>
							<a href="{:url('supplier/del', ['id' => $vo.id])}">上架</a>
						</if>
						
					</td>
		
				</tr>
				</foreach>
			</tbody>
		</table>
		<div class="pagination">{$page}</div>
	</div>
	<script src="__STATIC__/js/admin.js"></script>
</body>
</html>